<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">  
  <title>视频管理</title>
 </head>
 <body>
 <center><h3>视频列表</h3></center>
 <form method="post" action="ind.php?c=video&m=search"><tr>
 <input name="search" type="text"  placeholder="查询内容"> 
 <button type="submit" >查询</button></tr></form>
 <table align="center" width="80%" border=1> 
   <th>用户编号</th>
   <th>视频名称</th>   
   <th>视频类型</th>
   <th>海报</th>
   <th>内容简介</th>
   <th>添加日期</th>
   <th>上传用户</th> 
   <th>点击率</th> 
   <th>下载量</th> 
   <th>下载地址</th> 
   <th>操作</th> 
 </tr>
 <?php
 //var_dump($data);
 if($data==false)
 {
  echo "无";
 }
 else foreach ($data as $row) {
	 echo '<tr>';
	 echo '<td>'.$row['vid'].'</td>';
	 echo '<td>'.$row['videoname'].'</td>';	 
	 echo '<td>'.$row['typename'].'</td>';
	 echo '<td><img src=./images/'.$row['pic'].' width=100></td>';  
   echo '<td>'.$row['intro'].'</td>'; 
   echo '<td>'.$row['uploaddate'].'</td>';
   echo '<td>'.$row['uploadadmin'].'</td>';
   echo '<td>'.$row['hittimes'].'</td>';
	 echo '<td>'.$row['downtimes'].'</td>';
   echo '<td>'.$row['address'].'</td>';
	 echo '<td>
   <a href="ind.php?c=video&m=videoform">添加</a> |'.
   '<a href="ind.php?c=video&m=videoedit&id='.$row['vid'].' ">修改</a> | 
	 <a href="ind.php?c=video&m=delvideo&id='.$row['vid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
	 echo '</tr>';  
  }
  echo '</table>';  
  $totalrows = count($data);
  echo "<table align='center'><tr><td>共有{$totalrows}名用户</td></tr></table>";  
 ?>
 </body>
</html>
